package com.qhhc.service.impl;

import com.qhhc.entity.SysUser;
import com.qhhc.mapper.SysUserMapper;
import com.qhhc.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserService implements ISysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public void insertUser(SysUser user) {
        sysUserMapper.insertUser(user);
    }

    @Override
    public List<SysUser> selectAll() {
        return sysUserMapper.selectAllUsers();
    }

    @Override
    public SysUser selectById(Long id) {
        return sysUserMapper.selectUserById(id);
    }

    @Override
    public void updateUser(SysUser user) {
        sysUserMapper.updateUser(user);
    }

    @Override
    public void deleteUser(Long userId) {
        sysUserMapper.deleteUser(userId);
    }
} 